package com.example.demo.mapper;

import com.example.demo.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    /**
     * 根据名字获取用户信息
     * @param username
     * @return
     */
    @Select("select id, user_name, password, delete_flag, create_time, update_time" +
            " from user_info where user_name = #{username} and delete_flag != 1")
    User selectUserByName(String username);
}
